# -*- coding: utf-8 -*-
# @Time    : 2021/12/2 2:01 下午
# @Author  : zlt
# @FileName: util_ip.py
# @Software: PyCharm
import socket

def get_ip():
    # 获取计算机名称
    hostname = socket.gethostname()
    # 获取本机IP
    ip = socket.gethostbyname(hostname)
    return ip